<?php

namespace common\models\datas;

use Yii;

/**
 * This is the model class for table "{{%packet_attr}}".
 *
 * @property integer $id
 * @property integer $packet_id
 * @property integer $customer
 * @property string $money
 * @property integer $status
 * @property integer $is_receive
 * @property integer $receive_time
 */
class PacketAttr extends \common\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%packet_attr}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['packet_id', 'customer', 'status', 'is_receive', 'receive_time'], 'integer'],
            [['money'], 'number']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('common', '自增id'),
            'packet_id' => Yii::t('common', '红包id'),
            'customer' => Yii::t('common', '会员id'),
            'money' => Yii::t('common', '红包金额'),
            'status' => Yii::t('common', '状态（0 未抢 1已抢）'),
            'is_receive' => Yii::t('common', '是否领取（验证手机号便可领取 0 未领取 1 已领取）'),
            'receive_time' => Yii::t('common', '抢取时间'),
        ];
    }
}
